1. Technical Field
The present invention relates generally to data processing systems and more particularly to storage devices and storage systems. Still more specifically, the present invention provides a method and apparatus for providing a tape drive that supports update-in-place.
2. Description of Related Art
Tapes store data sequentially from the beginning of the tape to the end of the tape. A computer system cannot modify data stored in the middle of the data stored on the tape. A tape drive is an append-only storage system. Thus, data can be appended to the end of the data currently stored on the tape. Data stored in the middle of the data on a tape can be modified, but in this case, all of the data stored after the modified data on the entire tape will be invalidated. Therefore, data cannot be modified in the middle of the tape and have the data located after the modified data remain usable. When data is replaced in the middle of the tape, all data located on all tracks on the entire tape after the replaced data is invalidated.
While tape storage is directly, i.e. randomly, accessible for reading and writing, there are no tape storage devices that support an update-in-place capability. That is, an attempt to read a virtual or physical tape record location beyond the updated or rewritten record is not permitted because the data located after the updated or rewritten record is invalid after the update.
FIG. 1 is a block diagram of a data processing system 100 that includes a tape application 102 that accesses a tape drive 104 through a tape driver 106 in accordance with the prior art.
Tape application 102 issues requests to access tape drive 104 first to tape driver 106 which then forwards the requests to tape drive 104. Data is stored in records on tape media 108 that is included within tape drive 104. When a particular record is to be accessed, tape media 108 must first be physically positioned to that record. When a record is to be read, tape media 108 is wound and rewound until that record is reached on tape media 108. The data can then be read from the record and transmitted from tape drive 104 back to tape driver 106.
Additional data can be stored in tape drive 104 by appending additional records to the end of the data that is already stored on tape media 108. Existing data that is already stored on tape media 108 can also be modified. When existing data is to be modified, tape media 108 is wound and rewound until the record that includes that data is reached on tape media 108. The new data can then be written to that record. In this case, all of the data that is stored on all tracks of the tape after the modified record is invalidated.
For example, FIG. 1 illustrates reading a record, such as record 54, from tape media 108. When a record, such as record 54, is read, the data on tape media 108 is not affected. It remains valid. When a record, such as new record 58 is appended to the end of the existing records, the existing records are not affected. They remain valid. If, however, an existing record, such as record 55, is modified, the remaining records that are located after the modified record are invalidated. In this case, if record 55 is modified, records 56–58 are invalidated.
Therefore, a need exists for a method and apparatus for providing a tape drive that supports update-in-place.